package com.zjdiepu.www.model.dz.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;

import com.zjdiepu.www.base.core.BaseModel;

/**
 * 车牌登记<br/>
 * @author xiongxiaotun<br/>
 * @time 2017年05月10日 12时42分<br/>
 * @since 1.0<br/>
 */
@ApiModel(value="DzRegistration", description="车牌登记", parent = BaseModel.class)
public class DzRegistration extends BaseModel {
	
	private static final long serialVersionUID = 1L;
	/**
	 * @author xiongxiaotun <br/>
	 * @Title: isCompleted  <br/>
	 * @Description: 是否完成资料录入 <br/>
	 * @return
	 * @version V1.0  <br/>
	 */
	public boolean isCompleted(){
		if(!StringUtils.isNoneBlank(busiId, cusId, carId,
				dvm, licensePlate, registrationNumber)) {//不含空
			return false;
		}
		//新版本
		if(StringUtils.isBlank(regionRegistration)) {
			//老版本
			if(StringUtils.isBlank(provinceRegistration) || StringUtils.isBlank(areaRegistration)) {
				return false;
			}
		}
		if(!ObjectUtils.allNotNull(dateRegistrationFirst,dateRegistrationNow)) {
			return false;
		}
		return true;
	}
	/**
	 * 业务ID
	 */
	@ApiModelProperty(name="busiId",required=false,value="业务ID",example="业务ID")
	private String busiId;
	
	/**
	 * 客户ID
	 */
	@ApiModelProperty(name="cusId",required=false,value="客户ID",example="客户ID")
	private String cusId;
	
	/**
	 * 车辆ID
	 */
	@ApiModelProperty(name="carId",required=false,value="车辆ID",example="车辆ID")
	private String carId;
	
	/**
	 * 上牌地_省
	 */
	@ApiModelProperty(name="provinceRegistration",required=false,value="上牌地_省",example="上牌地_省")
	private String provinceRegistration;
	
	/**
	 * 上牌地_市
	 */
	@ApiModelProperty(name="areaRegistration",required=false,value="上牌地_市",example="上牌地_市")
	private String areaRegistration;
	
	/**
	 * 车管所
	 */
	@ApiModelProperty(name="dvm",required=false,value="车管所",example="车管所")
	private String dvm;
	
	/**
	 * 车牌号
	 */
	@ApiModelProperty(name="licensePlate",required=false,value="车牌号",example="车牌号")
	private String licensePlate;
	
	/**
	 * 机动车登记证号
	 */
	@ApiModelProperty(name="registrationNumber",required=false,value="机动车登记证号",example="机动车登记证号")
	private String registrationNumber;
	
	/**
	 * 上牌地区
	 */
	@ApiModelProperty(name="regionRegistration",required=false,value="上牌地区",example="上牌地区")
	private String regionRegistration;
	
	/**
	 * 新车上牌时间
	 */
	@ApiModelProperty(name="dateRegistrationFirst",required=false,value="新车上牌时间",example="2017-04-23 14:22:43")
	private Date dateRegistrationFirst;
	
	/**
	 * 本次上牌登记时间
	 */
	@ApiModelProperty(name="dateRegistrationNow",required=false,value="本次上牌登记时间",example="2017-04-23 14:22:43")
	private Date dateRegistrationNow;
	
	/**
	 * 上牌地_省
	 */
	@ApiModelProperty(name="provinceRegistrationDisplay",required=false,value="上牌地_省",example="上牌地_省")
	private String provinceRegistrationDisplay;
	
	/**
	 * 上牌地_市
	 */
	@ApiModelProperty(name="areaRegistrationDisplay",required=false,value="上牌地_市",example="上牌地_市")
	private String areaRegistrationDisplay;
	
	public String getProvinceRegistrationDisplay() {
		return provinceRegistrationDisplay;
	}

	public void setProvinceRegistrationDisplay(String provinceRegistrationDisplay) {
		this.provinceRegistrationDisplay = provinceRegistrationDisplay;
	}

	public String getAreaRegistrationDisplay() {
		return areaRegistrationDisplay;
	}

	public void setAreaRegistrationDisplay(String areaRegistrationDisplay) {
		this.areaRegistrationDisplay = areaRegistrationDisplay;
	}

	public String getBusiId(){
		return this.busiId;
	}
	
	public void setBusiId(String busiId){
		this.busiId = busiId;
	}

	public String getCusId(){
		return this.cusId;
	}
	
	public void setCusId(String cusId){
		this.cusId = cusId;
	}

	public String getCarId(){
		return this.carId;
	}
	
	public void setCarId(String carId){
		this.carId = carId;
	}

	public String getProvinceRegistration(){
		return this.provinceRegistration;
	}
	
	public void setProvinceRegistration(String provinceRegistration){
		this.provinceRegistration = provinceRegistration;
	}

	public String getAreaRegistration(){
		return this.areaRegistration;
	}
	
	public void setAreaRegistration(String areaRegistration){
		this.areaRegistration = areaRegistration;
	}

	public String getDvm(){
		return this.dvm;
	}
	
	public void setDvm(String dvm){
		this.dvm = dvm;
	}

	public String getLicensePlate(){
		return this.licensePlate;
	}
	
	public void setLicensePlate(String licensePlate){
		this.licensePlate = licensePlate;
	}

	public String getRegistrationNumber(){
		return this.registrationNumber;
	}
	
	public void setRegistrationNumber(String registrationNumber){
		this.registrationNumber = registrationNumber;
	}

	public Date getDateRegistrationFirst(){
		return this.dateRegistrationFirst;
	}
	
	public void setDateRegistrationFirst(Date dateRegistrationFirst){
		this.dateRegistrationFirst = dateRegistrationFirst;
	}

	public Date getDateRegistrationNow(){
		return this.dateRegistrationNow;
	}
	
	public void setDateRegistrationNow(Date dateRegistrationNow){
		this.dateRegistrationNow = dateRegistrationNow;
	}

	public String getRegionRegistration() {
		return regionRegistration;
	}

	public void setRegionRegistration(String regionRegistration) {
		this.regionRegistration = regionRegistration;
	}

	@Override
	public String toString() {
		return super.toString() + "DzRegistration [busiId = " + busiId + ", cusId = " + cusId + ", carId = " + carId + ", provinceRegistration = " + provinceRegistration + ", areaRegistration = " + areaRegistration + ", "
			+ "dvm = " + dvm + ", licensePlate = " + licensePlate + ", registrationNumber = " + registrationNumber + ", dateRegistrationFirst = " + dateRegistrationFirst + ", dateRegistrationNow = " + dateRegistrationNow + "]";
	}
    
}